//
//  HYLShopView.m
//  纯代码封装
//
//  Created by hyl on 16/5/1.
//  Copyright © 2016年 hyl. All rights reserved.
//

#import "HYLShopView.h"
#import "HYLShop.h"
@interface HYLShopView ()
@property (weak, nonatomic) IBOutlet UIImageView *iconView;
@property (weak, nonatomic) IBOutlet UILabel *nameLable;

@end
@implementation HYLShopView
-(instancetype)init{
    if (self=[super init]) {
        HYLShopView *shopView=[[[NSBundle mainBundle]loadNibNamed:NSStringFromClass([self class]) owner:nil options:nil] firstObject];
        self=shopView;
    }
    return self;
}
+(instancetype)shopView{
    return [[[NSBundle mainBundle]loadNibNamed:NSStringFromClass(self) owner:nil options:nil] firstObject];
}
-(void)setShop:(HYLShop *)shop{
    _shop=shop;
    self.iconView.image=[UIImage imageNamed:shop.icon];
    self.nameLable.text=shop.name;
}
@end
